﻿<Window x:Class="WgpgGUI.DialogAboutWgpg"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="{Binding RelativeSource={RelativeSource Self}, Mode=OneTime, Path=ProductTitle}" 
        x:Uid="idAboutBox"
        Style="{DynamicResource AboutDialogStyle}"
        WindowStartupLocation="CenterOwner">
    
    <Window.Resources>
        <XmlDataProvider x:Uid="XmlDataProvider_1" x:Key="aboutProvider" XPath="ApplicationInfo" IsAsynchronous="False" IsInitialLoadEnabled="True">
            <x:XData x:Uid="x:XData_1">
                <ApplicationInfo x:Uid="ApplicationInfo_1">
                    <Link x:Uid="Link_1" Uri="http://www.jimmygilles.net/">More Info</Link>
                </ApplicationInfo>
            </x:XData>
        </XmlDataProvider>
        <Image x:Uid="Image_1" x:Key="aboutLogo" Source="/WgpgCore;component/Images/AboutLogo.png" />
        <Style x:Uid="Style_1" x:Key="AboutDialogStyle" TargetType="Window">
            <Setter x:Uid="Setter_1" Property="Height" Value="Auto" />
            <Setter x:Uid="Setter_2" Property="Width" Value="500" />
            <Setter x:Uid="Setter_3" Property="ShowInTaskbar" Value="False" />
            <Setter x:Uid="Setter_4" Property="ResizeMode" Value="NoResize" />
            <Setter x:Uid="Setter_5" Property="WindowStyle" Value="SingleBorderWindow" />
            <Setter x:Uid="Setter_6" Property="SizeToContent" Value="Height" />
        </Style>
        <Style x:Uid="Style_2" x:Key="DisplayAreaStyle" TargetType="{x:Type StackPanel}">
            <Setter x:Uid="Setter_7" Property="Margin" Value="10,10,10,5" />
        </Style>
        <Style x:Uid="Style_3" x:Key="BackgroundStyle" TargetType="{x:Type StackPanel}">
            <Setter x:Uid="Setter_8" Property="Background">
                <Setter.Value>
                    <LinearGradientBrush x:Uid="LinearGradientBrush_1" EndPoint="0,1">
                        <GradientStop x:Uid="GradientStop_1" Offset="0" Color="LightGray" />
                        <GradientStop x:Uid="GradientStop_2" Offset="0.55" Color="White" />
                        <GradientStop x:Uid="GradientStop_3" Offset="0.85" Color="White" />
                        <GradientStop x:Uid="GradientStop_4" Offset="1" Color="LightGray" />
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Uid="Style_4" TargetType="Label">
            <Setter x:Uid="Setter_9" Property="Padding" Value="0" />
        </Style>
        <Style x:Uid="Style_5" x:Key="ParagraphSeparator" TargetType="{x:Type Label}">
            <Setter x:Uid="Setter_10" Property="Padding" Value="0,10,0,0" />
        </Style>
        <Style x:Uid="Style_6" x:Key="LinkLabelStyle">
            <Setter x:Uid="Setter_11" Property="Control.Padding" Value="0" />
            <Setter x:Uid="Setter_12" Property="Control.VerticalAlignment" Value="Center" />
        </Style>
        <Style x:Uid="Style_7" x:Key="ReadOnlyDescStyle" TargetType="{x:Type TextBox}">
            <Setter x:Uid="Setter_13" Property="MinLines" Value="6" />
            <Setter x:Uid="Setter_14" Property="MaxLines" Value="6" />
            <Setter x:Uid="Setter_15" Property="IsReadOnly" Value="True" />
            <Setter x:Uid="Setter_16" Property="TextWrapping" Value="WrapWithOverflow" />
            <Setter x:Uid="Setter_17" Property="VerticalScrollBarVisibility" Value="Visible" />
        </Style>
        <Style x:Uid="Style_8" x:Key="OkButtonStyle" TargetType="{x:Type Button}">
            <Setter x:Uid="Setter_18" Property="MinWidth" Value="75" />
            <Setter x:Uid="Setter_19" Property="Margin" Value="0,5" />
            <Setter x:Uid="Setter_20" Property="DockPanel.Dock" Value="Right" />
            <Setter x:Uid="Setter_21" Property="IsDefault" Value="True" />
            <Setter x:Uid="Setter_22" Property="IsCancel" Value="True" />
        </Style>
    </Window.Resources>
    
    <StackPanel x:Uid="clientArea" Style="{StaticResource BackgroundStyle}">
        <StaticResource x:Uid="StaticResource_1" ResourceKey="aboutLogo" />
        <StackPanel x:Uid="displayArea" Style="{StaticResource DisplayAreaStyle}" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Mode=OneTime}">
            <Label x:Name="productName" x:Uid="productName" Content="{Binding Mode=OneTime, Path=Product}" />
            <StackPanel x:Uid="versionArea" Orientation="Horizontal">
                <Label x:Name="versionLabel" x:Uid="VersionLabel" Content="Version - " />
                <Label x:Name="version" x:Uid="version" Content="{Binding Mode=OneTime, Path=Version}" />
            </StackPanel>
            <StackPanel x:Uid="gpgVersionArea" Orientation="Horizontal">
                <Label x:Name="gpgVersionLabel" x:Uid="GpgVersionLabel" Content="GPG Version - " />
                <Label x:Name="gpgVersion" x:Uid="gpgVersion" Content="{Binding Mode=OneTime, Path=GpgVersion}" />
            </StackPanel>
            <Label x:Name="copyright" x:Uid="copyright" Content="{Binding Mode=OneTime, Path=Copyright}"  />
            <Label x:Name="company" x:Uid="company" Content="{Binding Mode=OneTime, Path=Company}" />
            <Label x:Name="reserved" x:Uid="reserved" Content="All Rights Reserved." />
            <Label x:Name="info" x:Uid="info" Style="{StaticResource ParagraphSeparator}" Content="Product details:" />
            <TextBox x:Name="description" x:Uid="description" Text="{Binding Mode=OneTime, Path=Description}" Style="{StaticResource ReadOnlyDescStyle}" />
            <DockPanel x:Uid="buttonArea">
                <Button x:Name="okButton" x:Uid="okButton" Style="{StaticResource OkButtonStyle}" Content="_OK" />
                <Label x:Name="productLink" x:Uid="productLink" Style="{StaticResource LinkLabelStyle}" >
                    <Hyperlink x:Name="hyperlink" x:Uid="hyperlink" NavigateUri="{Binding Mode=OneTime, Path=LinkUri}" Style="{StaticResource LinkLabelStyle}" Hyperlink.RequestNavigate="Hyperlink_RequestNavigate">
                        <TextBlock x:Uid="TextBlock_1" Text="{Binding Mode=OneTime, Path=LinkText}" />
                    </Hyperlink>
                </Label>
            </DockPanel>
        </StackPanel>
    </StackPanel>
</Window>